local bujueqing = fk.CreateSkill{
    name = "lingling__bujueqing",
    tags = {Skill.Compulsory}
}
Fk:loadTranslationTable{
    ["lingling__bujueqing"] = "不绝情",
    [":lingling__bujueqing"] = "锁定技，你始终视为装备着【寒冰剑】，且发动效果后你摸一张牌。",
    ["#lingling__bujueqing"] = "不绝情：是否发动【寒冰剑】？",

    ["$lingling__bujueqing1"] = "情丝如雪，难当暖阳。",
    ["$lingling__bujueqing2"] = "有情总被无情负，绝情方无软肋生。",
}

bujueqing:addEffect(fk.AfterCardUseDeclared, {
    anim_type = " ",
    can_trigger = function(self, event, target, player, data)
        return target == player and player:hasSkill(bujueqing.name) and data.card.name == "slash" and Fk.skills["#ling__ice_sword_skill"] and Fk.skills["#ling__ice_sword_skill"]:isEffectable(player) and #player:getAvailableEquipSlots(Card.SubtypeWeapon) > 0
    end,
    on_cost = function (self, event, target, player, data)
        if player.room:askToSkillInvoke(player, {
            skill_name = "#ling__ice_sword_skill",
            prompt = "#lingling__bujueqing",
        }) then
            return true
        end
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        room:broadcastPlaySound("./packages/standard_cards/audio/card/ice_sword")
        room:setEmotion(player, "./packages/standard_cards/image/anim/ice_sword")
        Fk.skills["#ling__ice_sword_skill"]:use(event, target, player, data)
        player:drawCards(1, bujueqing.name)
        --data:changeCard("ice__slash", data.card.suit, data.card.number, "#ling__ice_sword_skill")
    end,
})

bujueqing:addEffect(fk.PreCardUse, {
    anim_type = " ",
    can_refresh = function (self, event, target, player, data)
        return target == player and player:hasSkill(bujueqing.name) and #player:getAvailableEquipSlots(Card.SubtypeWeapon) > 0 and
        data.card.name == "ice__slash" and not data.card:isVirtual() and Fk.skills["#ling__ice_sword_skill"] and Fk.skills["#ling__ice_sword_skill"]:isEffectable(player)
    end,
    on_refresh = function (self, event, target, player, data)
        local room = player.room
        room:notifySkillInvoked(player, bujueqing.name, " ")
        room:broadcastPlaySound("./packages/standard_cards/audio/card/ice_sword")
        room:setEmotion(player, "./packages/standard_cards/image/anim/ice_sword")
        --Fk.skills["##ling__ice_sword_skill_2_trig"]:use(event, target, player, data)
        player:drawCards(1, bujueqing.name)
        data.disresponsiveList = table.simpleClone(player.room.players)
    end,
})

bujueqing:addEffect("atkrange", {
    correct_func = function(self, from, to)
        if from:hasSkill(bujueqing.name) and #from:getAvailableEquipSlots(Card.SubtypeWeapon) > 0 and
        Fk.skills["#ling__ice_sword_skill"] and Fk.skills["#ling__ice_sword_skill"]:isEffectable(from) and
        from:getAttackRange(nil, {self.name}) < 2 then
        return 1
        end
    end,
})

bujueqing:addAcquireEffect(function (self, player, is_start)
    player.room:addSkill("#ling__ice_sword_skill")
end)

return bujueqing